<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>成绩-在线考试系统</title>
<link rel="stylesheet" type="text/css" href="03.css">
<link rel='icon' href="lvji.jpg" sizes="16*16">
</head>
<body >
	<?php 
	   $sum=0;
	   $answers1 = $_POST['answers1'];
	   $answers2 = $_POST['answers2'];
	   $answers3 = $_POST['answers3'];
	   $answers4 = $_POST['answers4'];
	   $answers5 = $_POST['answers5'];
	   $answers6 = $_POST['answers6'];
	   $answers7 = $_POST['answers7'];
	   $answers8 = $_POST['answers8'];
	   $answers9 = $_POST['answers9'];
	   $answers10 = $_POST['answers10'];
	   $answers11 = $_POST['answers11'];
	   $answers12 = $_POST['answers12'];
	   $answers13 = $_POST['answers13'];
	   $answers14 = $_POST['answers14'];
	   $answers15 = $_POST['answers15'];
	   $answers16 = $_POST['answers16'];
	   $answers17 = $_POST['answers17'];
	   
	   if(empty($answers1)){
	       $timu1="未答题";
	       $score1=0;
	   }
	   elseif ($answers1 == "对"){
	       $score1=4;
	       $timu1="对";
	       $sum+=$score1;
	   }
	   else{
	       $score1=0;
	       $timu1="错";
	   }	   
	   if(empty($answers2)){
	       $timu2="未答题";
	       $score2=0;
	   }
	   elseif ($answers2 == "错"){
	       $score2=4;
	       $timu2="对";
	       $sum+=$score2;
	   }
	   else{
	       $score2=0;
	       $timu2="错";
	   }
	   if(empty($answers3)){
	       $timu3="未答题";
	       $score3=0;
	   }
	   elseif ($answers3 == "对"){
	       $score3=4;
	       $timu3="对";
	       $sum+=$score3;
	   }
	   else{
	       $score3=0;
	       $timu3="错";
	   }
	   if(empty($answers4)){
	       $timu4="未答题";
	       $score4=0;
	   }
	   elseif ($answers4 == "对"){
	       $score4=4;
	       $timu4="对";
	       $sum+=$score4;
	   }
	   else{
	       $score4=0;
	       $timu4="错";
	   }
	   if(empty($answers5)){
	       $timu5="未答题";
	       $score5=0;
	   }
	   elseif ($answers5 == "对"){
	       $score5=4;
	       $timu5="对";
	       $sum+=$score5;
	   }
	   else{
	       $score5=0;
	       $timu5="错";
	   }
	   if(empty($answers6)){
	       $timu6="未答题";
	       $score6=0;
	   }
	   elseif ($answers6 == "D"){
	       $score6=6;
	       $timu6="对";
	       $sum+=$score6;
	   }
	   else{
	       $score6=0;
	       $timu6="错";
	   }
	   if(empty($answers7)){
	       $timu7="未答题";
	       $score7=0;
	   }
	   elseif ($answers7 == "A"){
	       $score7=6;
	       $timu7="对";
	       $sum+=$score7;
	   }
	   else{
	       $score7=0;
	       $timu7="错";
	   }
	   if(empty($answers8)){
	       $timu8="未答题";
	       $score8=0;
	   }
	   elseif ($answers8 == "D"){
	       $score8=6;
	       $timu8="对";
	       $sum+=$score8;
	   }
	   else{
	       $score8=0;
	       $timu8="错";
	   }
	   if(empty($answers9)){
	       $timu9="未答题";
	       $score9=0;
	   }
	   elseif ($answers9 == "D"){
	       $score9=6;
	       $timu9="对";
	       $sum+=$score9;
	   }
	   else{
	       $score9=0;
	       $timu9="错";
	   }
	   if(empty($answers10)){
	       $timu10="未答题";
	       $score10=0;
	   }
	   elseif ($answers10 == "B"){
	       $score10=6;
	       $timu10="对";
	       $sum+=$score10;
	   }
	   else{
	       $score10=0;
	       $timu10="错";
	   }
	   if(empty($answers11)){
	       $timu11="未答题";
	       $score11=0;
	   }
	   elseif (implode($answers11) == "BCD"){
	       $score11=6;
	       $timu11="对";
	       $sum+=$score11;
	   }
	   else{
	       $score11=0;
	       $timu11="错";
	   }	   
	   if(empty($answers12)){
	       $timu12="未答题";
	       $score12=0;
	   }
	   elseif (implode($answers12) == "ABC"){
	       $score12=6;
	       $timu12="对";
	       $sum+=$score12;
	   }
	   else{
	       $score12=0;
	       $timu12="错";
	   }
	   if(empty($answers13)){
	       $timu13="未答题";
	       $score13=0;
	   }
	   elseif (implode($answers13) == "AB"){
	       $score13=6;
	       $timu13="对";
	       $sum+=$score13;
	   }
	   else{
	       $score13=0;
	       $timu13="错";
	   }  
	   if(empty($answers14)){
	       $timu14="未答题";
	       $score14=0;
	   }
	   elseif (implode($answers14) == "AB"){
	       $score14=6;
	       $timu14="对";
	       $sum+=$score14;
	   }
	   else{
	       $score14=0;
	       $timu14="错";
	   }	   
	   if(empty($answers15)){
	       $timu15="未答题";
	       $score15=0;
	   }
	   elseif (implode($answers15) == "CD"){
	       $score15=6;
	       $timu15="对";
	       $sum+=$score15;
	   }
	   else{
	       $score15=0;
	       $timu15="错";
	   }	   
	   if(empty($answers16)){
	       $timu16="未答题";
	       $score16=0;
	   }
	   elseif ($answers16 == "80"){
	       $score16=10;
	       $timu16="对";
	       $sum+=$score16;
	   }
	   else{
	       $score16=0;
	       $timu16="错";
	   }
	   if(empty($answers17)){
	       $timu17="未答题";
	       $score17=0;
	   }
	   elseif ($answers17 == "implode()"){
	       $score17=10;
	       $timu17="对";
	       $sum+=$score17;
	   }
	   else{
	       $score17=0;
	       $timu17="错";
	   }	   
	?>
	
	<div class="div_1">
		<h3 align="center">在线考试系统&nbsp;-&nbsp;考试结束</h3>
	</div>
	<div class="div_2">
		<h2 align="center">您的成绩：<?php echo $sum;?>分</h2>
		<table>		
		<tr>
			<th width="200px">题型</th>
			<th width="200px">题号</th>
			<th width="300px">答题情况</th>
			<th width="200px">得分</th>
		</tr>
		<tr>
			<td rowspan="5">判断题</td>
			<td>1</td>
			<td><?php  echo $timu1;?></td>
			<td><?php echo $score1;?></td>
		</tr>
		<tr class="td_1">			
			<td >2</td>
			<td><?php  echo $timu2;?></td>
			<td><?php echo $score2;?></td>
		</tr>
		<tr>			
			<td>3</td>
			<td><?php  echo $timu3;?></td>
			<td><?php echo $score3;?></td>
		</tr>
		<tr class="td_1">			
			<td >4</td>
			<td><?php  echo $timu4;?></td>
			<td><?php echo $score4;?></td>
		</tr>
		<tr>			
			<td>5</td>
			<td><?php  echo $timu5;?></td>
			<td><?php echo $score5;?></td>
		</tr>
		
		<tr class="td_1">
			<td rowspan="5">单选题</td>
			<td>1</td>
			<td><?php  echo $timu6;?></td>
			<td><?php echo $score6;?></td>
		</tr>
		<tr >			
			<td >2</td>
			<td><?php  echo $timu7;?></td>
			<td><?php echo $score7;?></td>
		</tr>
		<tr class="td_1">			
			<td>3</td>
			<td><?php  echo $timu8;?></td>
			<td><?php echo $score8;?></td>
		</tr>
		<tr >			
			<td >4</td>
			<td><?php  echo $timu9;?></td>
			<td><?php echo $score9;?></td>
		</tr>
		<tr class="td_1">			
			<td>5</td>
			<td><?php  echo $timu10;?></td>
			<td><?php echo $score10;?></td>
		</tr>
		
		<tr>
			<td rowspan="5">多选题</td>
			<td>1</td>
			<td><?php  echo $timu11;?></td>
			<td><?php echo $score11;?></td>
		</tr>
		<tr class="td_1">			
			<td >2</td>
			<td><?php  echo $timu12;?></td>
			<td><?php echo $score12;?></td>
		</tr>
		<tr>			
			<td>3</td>
			<td><?php  echo $timu13;?></td>
			<td><?php echo $score13;?></td>
		</tr>
		<tr class="td_1">			
			<td >4</td>
			<td><?php  echo $timu14;?></td>
			<td><?php echo $score14;?></td>
		</tr>
		<tr>			
			<td>5</td>
			<td><?php  echo $timu15;?></td>
			<td><?php echo $score15;?></td>
		</tr>
		
		<tr class="td_1">
			<td rowspan="2" >填空题</td>
			<td >1</td>
			<td><?php  echo $timu16;?></td>
			<td><?php echo $score16;?></td>
		</tr>
		<tr >			
			<td >2</td>
			<td><?php  echo $timu17;?></td>
			<td><?php echo $score17;?></td>
		</tr>
	</table>
	<form name="system3" action="01.php" method="post">
	<input type="submit" name="back" value="返回首页" align="center">
	</form>
	</div>
	<div class="div_3">
		<p >PHP在线考试系统&nbsp;&nbsp;本项目仅供学习使用</p>
	</div>
	<!-- 正确答案
	1~5 √×√√√
	6~10 DADDB
	11~15 BCD  ABC  AB  AB  CD  
	16、80
	17、implode()
	-->
</body>
</html>

